package org.smarthings;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class Response {
	public static final int OK = 200;
	private byte[] payload;
	private int code;
	private Map<String, List<String>> headers;

	public Response(byte[] payload, int code, Map<String, List<String>> headers) {
		this.payload = payload;
		this.code = code;
		this.headers = headers;
	}

	public Response(byte[] payload, int code) {
		this(payload, code, new HashMap<String, List<String>>());
	}

	public static Response getEmptyResponse() {
		return new Response("".getBytes(), Response.OK);
	}

	public byte[] getPayload() {
		return payload;
	}

	public int getCode() {
		return code;
	}

	public Map<String, List<String>> getHeaders() {
		return headers;
	}
}